import request from "@/utils/request";

// 查询系统字典列表
export function getDictSysListByConditionApi(data) {
  return request({
    url: "/config/dict/geDictSysListByCondition",
    method: "get",
    params: data,
  });
}

// 创建字典
export function createDictApi(data) {
  return request({
    url: "/config/dict/addDict",
    method: "post",
    data,
  });
}

// 更新字典
export function updateDictApi(data) {
  return request({
    url: "/config/dict/updateDict",
    method: "post",
    data,
  });
}

// 删除字典
export function deleteDictApi(data) {
  return request({
    url: "/config/dict/deleteDict",
    method: "post",
    data,
  });
}

// 查询字典值列表
export function getDictItemListByConditionApi(data) {
  return request({
    url: "/config/dict/geDictItemListByCondition",
    method: "get",
    params: data,
  });
}

// 添加字典值
export function addDictItemApi(data) {
  return request({
    url: "/config/dict/addItem",
    method: "post",
    data,
  });
}

// 更新字典值
export function updateDictItemApi(data) {
  return request({
    url: "/config/dict/updateItem",
    method: "post",
    data,
  });
}

// 删除字典值
export function deleteDictItemApi(data) {
  return request({
    url: "/config/dict/deleteItem",
    method: "post",
    data,
  });
}
